<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    	<title>统战成员学习平台</title>
	    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
	    <link rel="stylesheet" type="text/css" href="../../css/discovery.css" />
	</head>
	<body>
		<div id='app' class="paddt" style="display:none" v-show="true">
			<div class="feedback">
				<textarea id="feedback_textarea" v-model="content" maxlength="150" placeholder="您在使用中遇到任何问题都可以向我们反馈，我们将持续改进"></textarea>
				<span>{{content.length}}/150</span>
			</div>
			<div tapmode @click="submit()" class="big_btn">确定</div>
		</div>
		<script type="text/javascript" src="../../script/api.js"></script>
		<script type="text/javascript" src="../../script/vue.min.js"></script>
		<script type="text/javascript" src="../../script/common.js"></script>
		<script type="text/javascript" src="../../script/layer_mobile/layer.js"></script>
		<script type="text/javascript">
		    new Vue({
				el: '#app',
		     	data: {
					content: ''
		     	},
				mounted: function() {
		        	var $this = this;
		        	apiready = function() {
						api.parseTapmode();

						$api.byId('feedback_textarea').addEventListener('click',function(){
							$api.byId('feedback_textarea').focus();
						});
                	}
		    	},
		    	methods: {
					submit: function() {
						var $this = this;
						if(!$this.content.length) return msgUtil.toast({msg: '请输入内容'});
						api.showProgress({
							title: '',
							text: '提交中...'
						});
						post('/client/feedback/add', {
							content: $this.content
						}, function(ret) {
							msgUtil.toast({
							    msg: ret.message
							});
							if(ret.isSuccess) {
								$this.content = ''
								setTimeout(function() {
									closeWin()
								}, 1000);
							}

						})
					}
		    	}
		    });
		</script>
	</body>
</html>
